<include file="__THEME__/public_header"/>
<link href="__APP__/friend.css" type="text/css" rel="stylesheet">
<include file="_nav"/>


<volist name="user" id="v">
{$v.uname}

    <a  onclick="acceptfriend('{$v.uid}')" style="cursor: pointer" >同意加为好友</a>
    <a  onclick="refusefriend('{$v.uid}')" style="cursor: pointer" >拒绝加为好友</a>

</volist>
<include file="__THEME__/public_footer"/>
<script>

    function acceptfriend(fid){
        $.post(U("friend/Index/friend_accept"), {fid: fid}, function (data) {
            if(data.status == 1){
                ui.success('消息已经发出！')
            }
        }, 'json');
    }


    function refusefriend(){
        $.post(U("friend/Index/friend_refuse"), {fid: fid}, function (data) {
            if(data.status == 1){
                ui.success('消息已经发出！')
            }
        }, 'json');
    }
</script>